﻿@inherits EntitesGridModel<Entity.ClientUri>

<EntitiesGrid Items="@Uris" TableClass="table table-hover" Context="url" SetKey="false">
    <TableHeader>
        <th scope="col">
            <SortableHeader Property="Uri"
                            Text="@Localizer["uri"]"
                            GridState="GridState" />
        </th>
        @if (Model.IsSpaClient())
        {
            <th scope="col" class="text-center">
                <SortableHeader Property="Cors"
                                Text="@Localizer["cors"]"
                                GridState="GridState" />
            </th>
        }
        <th scope="col" class="text-center">
            <SortableHeader Property="Redirect"
                            Text="@Localizer["redirect"]"
                            GridState="GridState" />
        </th>
        @if (Model.CanHandlePostLogout())
        {
            <th scope="col" class="text-center">
                <SortableHeader Property="PostLogout"
                                Text="@Localizer["post logout"]"
                                GridState="GridState" />
            </th>
        }
        <th></th>
    </TableHeader>
    <RowTemplate>
        <ClientUri Model="url" CanHandlePostLogout="Model.CanHandlePostLogout()" IsSpaClient="Model.IsSpaClient()" />
        <td>
            <AuthorizeButton Type="button" CssSubClass="btn-primary" Clicked="() => OnDeleteEntityClicked(url)">
                <span class="oi oi-trash"></span>
            </AuthorizeButton>
        </td>
    </RowTemplate>
</EntitiesGrid>
